using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Cafe.View
{
    public partial class FrmDmSanPham : FrmTemplate
    {
        Cafe.Controller.ControllerDmSanPham control = new Cafe.Controller.ControllerDmSanPham();
        DataSet dsDmSanPham = new DataSet();
        public FrmDmSanPham()
        {
            InitializeComponent();
            LayThongTin();
        }

        public void LayThongTin()
        {
            dsDmSanPham = control.LayThongTin();
            gridDmSanPham.DataSource = dsDmSanPham.Tables[0];
        }

        public override void PerformSave()
        {
            control.Update(dsDmSanPham.Tables[0]);
        }

        public override void PerformRefresh()
        {
            LayThongTin();
        }

    }
}